'use strict';

module.exports = app => {
  const { STRING, UUID, UUIDV4, INTEGER, DECIMAL } = app.Sequelize;

  const model = app.model.define('cost', {
    id: {
      type: UUID,
      defaultValue: UUIDV4,
      primaryKey: true,
      comment: 'Id',
    },
    code: {
      type: STRING,
      allowNull: false,
      comment: '科目代码',
    },
    name: {
      type: STRING,
      allowNull: false,
      comment: '科目名称',
    },
  }, {
    tableName: 'cost',
    comment: '费用科目表',
  });

  return model;
};
